package io.renren;

import java.util.*;

public class TreeTraversal {

    public static void main(String[] args) {

        // 创建数据列表
        List<DataModel> dataList = new ArrayList<>();
        // 填充数据
        dataList.add(new DataModel(1, "6501002", "xz", "meetca-1321321", 1, 1, 1, 0));
        dataList.add(new DataModel(2, "6501002001", "zc", "meetca-1321322", 1, 2, 1, 0));
        dataList.add(new DataModel(3, "6501002002", "zc", "meetca-1321323", 1, 3, 1, 0));
        dataList.add(new DataModel(4, "6501002003", "zc", "meetca-1321324", 1, 4, 1, 0));
        dataList.add(new DataModel(5, "6501003", "xz", "meetca-1321331", 2, 1, 1, 0));
        dataList.add(new DataModel(6, "6501003001", "zc", "meetca-1321332", 2, 2, 1, 0));
        dataList.add(new DataModel(7, "6501003002", "zc", "meetca-1321333", 2, 3, 1, 0));
        dataList.add(new DataModel(8, "6501003003", "zc", "meetca-1321334", 2, 4, 1, 0));
        dataList.add(new DataModel(9, "6501004", "xz", "meetca-1321431", 3, 1, 1, 0));
        dataList.add(new DataModel(10, "6501004001", "zc", "meetca-1321432", 3, 2, 1, 0));

        // 按照指定规则提取数据
        int[] groups = {1, 2, 3, 4}; // 每组的第六列值

        for (int group : groups) {
            System.out.println("第 " + group + " 组数据:");
            for (DataModel data : dataList) {
                if (data.getOrderVideo() == group) {
                    System.out.println(data.getId() + "\t" + data.getZcname() + "\t" + data.getOrderCity() + "\t" + data.getOrderVideo());
                }
            }
            System.out.println();
        }
    }
}
